if select(2, UnitClass"player") ~= "WARRIOR" then return end

local surge = 46916
local slam = 47475
local prev_action

local overlay = CreateFrame(nil, UIParent)

function overlay:Update()
	local has_talent = select(5, GetTalentInfo(2, 25)) > 0
	if not has_talent then
		return overlay:Clear()
	end
	local action = SecureButton_GetModifiedAttribute(BT4Button6, "action")
	if not action or action ~= prev_action then
		if action and select(4, GetActionInfo(action)) == slam then
			prev_action = action
			return overlay:Set(BT4Button6)
		else
			prev_action = nil
			return overlay:Clear()
		end
	end
end
 
 function overlay:Set(parent)
	print("overlay", "set", parent:GetName())
 end
 
 function overlay:Clear()
 	print("overlay", "clear")
end
